gridpack::math::ValueTransfer< FromType, ToType > Class Template Reference

#include <value_transfer.hpp>

Inheritance diagram for gridpack::math::ValueTransfer< FromType, ToType >:
Inheritance graph
[legend]

List of all members.

Classes

struct  null_deleter
 A thing to provide a null delete operation.

Public Member Functions

 ValueTransfer (const unsigned int &from_size, FromType *from, ToType *to=NULL)
 Default constructor.
 ~ValueTransfer (void)
 Destructor.
unsigned int size (void) const
 Get the length of the "to" buffer.
void go (void)
 do whatever is necessary to set up and copy values
ToType * to (void)
 Get a pointer to the "to" buffer.
template<>
unsigned int p_computeToSize (void) const
template<>
unsigned int p_computeToSize (void) const
template<>
void p_setup ()
template<>
void p_setup ()
template<>
void p_copy (void)
template<>
void p_copy (void)

Detailed Description

template<typename FromType, typename ToType>
class gridpack::math::ValueTransfer< FromType, ToType >

This provides a consistent way to transfer values between RealType and ComplexType arrays, being (hopefully) smart about when memory is allocated. The transfer works both ways: complex <-> real. This is not approprate for the case of real math with a complex-based math library!


Constructor & Destructor Documentation

template<typename FromType , typename ToType >
gridpack::math::ValueTransfer< FromType, ToType >::ValueTransfer ( const unsigned int &  from_size,
FromType *  from,
ToType *  to = NULL 
)
template<typename FromType , typename ToType >
gridpack::math::ValueTransfer< FromType, ToType >::~ValueTransfer ( void   ) 

Destructor.


Member Function Documentation

template<typename FromType , typename ToType >
void gridpack::math::ValueTransfer< FromType, ToType >::go ( void   ) 

do whatever is necessary to set up and copy values

template<>
unsigned int gridpack::math::ValueTransfer< ComplexType, RealType >::p_computeToSize ( void   )  const
template<>
unsigned int gridpack::math::ValueTransfer< RealType, ComplexType >::p_computeToSize ( void   )  const
template<>
void gridpack::math::ValueTransfer< ComplexType, RealType >::p_copy ( void   ) 
template<>
void gridpack::math::ValueTransfer< RealType, ComplexType >::p_copy ( void   ) 
template<>
void gridpack::math::ValueTransfer< ComplexType, ComplexType >::p_setup ( void   ) 
template<>
void gridpack::math::ValueTransfer< RealType, RealType >::p_setup ( void   ) 
template<typename FromType , typename ToType >
unsigned int gridpack::math::ValueTransfer< FromType, ToType >::size ( void   )  const

Get the length of the "to" buffer.

template<typename FromType , typename ToType >
ToType* gridpack::math::ValueTransfer< FromType, ToType >::to ( void   ) 

Get a pointer to the "to" buffer.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1